#include "CurrentThread.h"

#include <unistd.h>
#include <sys/syscall.h>

namespace CurrentThread {
  __thread int t_cacheTid = 0;
  void cacheTid() {
   t_cacheTid = static_cast<int>(syscall(SYS_gettid));  // 获取线程ID
  }
}